Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from science-computing:master #3

Open
wants to merge 231 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 6, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

primeos-work and others added 11 commits March 6, 2024 11:00
It was possible to declare and build packages where the package name
starts with a digit but it wasn't possible to declare them as
dependencies of another package.
This fixes #356 and I'm also adding a test for it to avoid regressions.

Now we could package `0ad`, `389-ds`, `6tunnel`, `7z`, `9pfs`, etc. \o/

Signed-off-by: Michael Weiss <[email protected]>
Let's avoid copy-pasted code :)
Using assertion macros in helper functions isn't ideal but the error
messages should contain enough context to figure out what went wrong.

Signed-off-by: Michael Weiss <[email protected]>
To avoid potentially unintended regressions when changing the regex.

Signed-off-by: Michael Weiss <[email protected]>
The parentheses aren't required here.
They can still help with readability but in this case it might be better
without them (the square brackets should be sufficient for a quick
orientation) so I'll drop them.

Signed-off-by: Michael Weiss <[email protected]>
"Any named character class may appear inside a bracketed [...] character
class. For example, [\p{Greek}[:digit:]]" [0]

[0]: https://docs.rs/regex/1.10.3/regex/index.html#character-classes

Signed-off-by: Michael Weiss <[email protected]>
The escaping shouldn't be required for "." and "*" inside a bracketed
character class (`[...]`) and we can avoid it for "-" if we place it at
the beginning or the end of the bracketed character class. The escaping
was also a bit confusing as "\" had to be escaped with another backslash
as it's a Rust string (raw strings would be better in this case).

Signed-off-by: Michael Weiss <[email protected]>
The last three `dep_parse_expect_err()` examples match the regex but
aren't supported by the version parsing yet (`a *` would also match the
regex with an `[:alnum:]` at the end).

Signed-off-by: Michael Weiss <[email protected]>
Downloads from the GitHub API don't work without sending a
user agent.

Signed-off-by: Nico Steinle <[email protected]>
In 80e0101, I first added a rule for a new Clippy lint (introduced in
1.73.0) to fix our optional CI check that lints with the beta toolchain.
This would break the required CI check against the MSRV so I decided to
allow unknown lints for that check in ef29d94. However, this isn't ideal
as it only applies to the CI checks and still shows the warnings when
developing or rather linting locally.
Luckily we can use the rustversion crate to make the Clippy lint
overrides via attributes also depend on the Rust/toolchain version (this
especially helps with cases like in 0556536 where the override is only
required for a single toolchain version).
It's just a bit unfortunate that I cannot use `stable(1.77)` since that
really only applies to stable versions and `1.77` is currently still a
beta version (so I have to combine `all`, `since`, and `before` to
produce a `version(1.77)`).

Signed-off-by: Michael Weiss <[email protected]>
Set a user agent header for github api downloads
Avoid unnecessary warnings with older Clippy versions
@pull pull bot added the ⤵️ pull label Mar 6, 2024
christophprokop and others added 18 commits March 6, 2024 22:34
…x-and-cleanup

Allow dependency names that start with a number (+ parsing regex cleanup)
This patch adds an optional flag `--tracing-chrome` which enables the
tracing-chrome backend for traces which then generates a
chrome://tracing compatible file.

Signed-off-by: Matthias Beyer <[email protected]>
A newer version of the Rust toolchain (1.78) detected this unused code
(`#[deny(dead_code)]` implied by `#[deny(unused)]`). It looks like the
last usage of this trait/method was removed in 5410676.

Signed-off-by: Michael Weiss <[email protected]>
Those traits were added to the prelude in the Rust 2021 Edition:
- https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html
- https://doc.rust-lang.org/1.77.1/core/prelude/rust_2021/index.html

A newer version of the Rust toolchain (1.78) detected these imports that
are redundant since 91b246d.

Signed-off-by: Michael Weiss <[email protected]>
The `PgConnection` struct is part of the Diesel prelude [0]. A newer
version of the Rust toolchain (1.78) detected these redundant imports.

We should likely use the Diesel prelude in some other files as well [1]:
> Diesel provides a prelude module, which exports most of the typically
> used traits and types. We are conservative about what goes in this
> module, and avoid anything which has a generic name. Files which use
> Diesel are expected to have use diesel::prelude::*;.

[0]: https://docs.rs/diesel/2.1.5/diesel/prelude/index.html
[1]: https://docs.rs/diesel/2.1.5/diesel/index.html#getting-started

Signed-off-by: Michael Weiss <[email protected]>
We don't have to bump the MSRV yet but this is the cleanest solution to
avoid hacks for the new `incompatible_msrv` Clippy lint [0] that got
added in 1.78.0. We'll probably have to bump the MSRV soon anyway (for
dependency updates) so let's just do it right away to get rid of those
false positives (we use `result_inspect::ResultInspect` for older Rust
versions but Clippy can't consider the `#[rustversion::since(1.76)]`).

[0]: https://rust-lang.github.io/rust-clippy/master/index.html#/incompatible_msrv

Signed-off-by: Michael Weiss <[email protected]>
A newer version of the Rust toolchain (1.78) detected these redundant
imports that are already covered by `use super::*`.

Signed-off-by: Michael Weiss <[email protected]>
This fixes a warning from the new `unnecessary_get_then_check` Clippy
lint [0] that got added in `1.78.0`.

[0]: https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_get_then_check

Signed-off-by: Michael Weiss <[email protected]>
Fix all clippy and rustc warnings (beta toolchain version 0.1.78)
This is simply the result of running `cargo update` without touching
Cargo.toml (required since we currently only use dependabot to update
direct dependencies and not indirect/transitive dependencies and useful
to avoid a lot of dependabot PRs for minor/patch updates that can be
bundled, like in this commit).

Signed-off-by: Michael Weiss <[email protected]>
Update all dependencies (Cargo.lock)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to 0.12.2.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](seanmonstar/reqwest@v0.11.24...v0.12.2)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…st-0.12.2

build(deps): bump reqwest from 0.11.24 to 0.12.2
Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](hyperium/h2@v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
The tracing "instrumentation" (yes, in quotes) that was used before this
patch was not really an instrumentation. It was rather a better form of
using the `log` crate.

This patch introduces some spans and associated tracing events for the
"meat" of the orchestrator algorithm.
Also, the tracing events now have fields instead of interpolating some
values in the trace message.

The tracing here is not really soffisticated yet, but it should be miles
better than the tracing before.

Signed-off-by: Matthias Beyer <[email protected]>
The imports are only for one fn in this file, so lets move them to the
top where all other imports are, to have them all together.

Signed-off-by: Matthias Beyer <[email protected]>
primeos-work and others added 30 commits January 14, 2025 14:34
…aph-0.7.1

build(deps): bump petgraph from 0.6.6 to 0.7.1
This file was added in 3b33514 but isn't required anymore (was probably
only relevant for the initial development - we don't use that local test
DB anymore and this depends on the local test setup so it should be set
by the user/developer).

Signed-off-by: Michael Weiss <[email protected]>
These are the last case-related "inconsistencies" that I found.

Signed-off-by: Michael Weiss <[email protected]>
I added this exception in 697cbdb to make CI happy/green but we can now
remove it again since the last update of the `indicatif` crate in
5a64ec8.

Signed-off-by: Michael Weiss <[email protected]>
This is already done for `DEPENDENCY_PARSING_RE` but was missing for
`VERSION_REGEX` (to parse `PackageVersion` into `semver::Version`).

It's an optional performance optimization since re-compiling regexes
should be avoided [0] and, depending on the code path, we might try to
convert many `PackageVersion`s.

[0]: https://docs.rs/regex/1.11.1/regex/index.html#avoid-re-compiling-regexes-especially-in-a-loop

Signed-off-by: Michael Weiss <[email protected]>
This used to be required in the past for the `result-inspect` crate
(s. 0b757ac) but the `Result::inspect()` API was stabilized in Rust
version 1.76.0 [0] and we could drop that crate in 786404d.

[0]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect

Signed-off-by: Michael Weiss <[email protected]>
This was added in a54efe7 but currently isn't required anymore so let's
drop it again.

Signed-off-by: Michael Weiss <[email protected]>
I've added this in 0451b6d but the "Added in [Rust version]" information
on the website [0] was wrong [1] (I was already suspicious as our Rust
beta CI check only recently hit this but didn't bother to look into it
until I got an unknown lint warning locally).

[0]: https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args
[1]: rust-lang/rust-clippy@db4aac6

Signed-off-by: Michael Weiss <[email protected]>
Merge various smaller cleanups
- Add the `signal` feature to `tokio` to interrupt and handle the
  Control-C signal in Butido.
- Add Control-C signal handling into the `Orchestrator`.
- Implement `Drop` on the `JobHandle` to ensure container cleanup.

Fixes #409

Signed-off-by: Nico Steinle <[email protected]>
Cleanup running containers on the Control-C signal
This is simply the result of running `cargo update` without touching
Cargo.toml (required since we currently only use dependabot to update
direct dependencies and not indirect/transitive dependencies and useful
to avoid a lot of dependabot PRs for minor/patch updates that can be
bundled, like in this commit).

Signed-off-by: Michael Weiss <[email protected]>
Update all dependencies (Cargo.lock)
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.19.0 to 0.20.0.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/git2-rs@git2-0.19.0...git2-0.20.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [colored](https://github.com/mackwic/colored) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/mackwic/colored/releases)
- [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md)
- [Commits](colored-rs/colored@v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: colored
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.69 to 0.10.70.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](sfackler/rust-openssl@openssl-v0.10.69...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…0.20.0

build(deps): bump git2 from 0.19.0 to 0.20.0
…ed-3.0.0

build(deps): bump colored from 2.2.0 to 3.0.0
…sl-0.10.70

build(deps): bump openssl from 0.10.69 to 0.10.70
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.9.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

The function `rand::thread_rng()` got renamed to `rand::rng()`:
rust-random/rand#1506

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Michael Weiss <[email protected]>
…0.9.0

build(deps): bump rand from 0.8.5 to 0.9.0
Optimize/beautify some error handling code that uses anyhow
Bumps [bytesize](https://github.com/bytesize-rs/bytesize) from 1.3.0 to 2.0.1.
- [Release notes](https://github.com/bytesize-rs/bytesize/releases)
- [Changelog](https://github.com/bytesize-rs/bytesize/blob/master/CHANGELOG.md)
- [Commits](bytesize-rs/bytesize@v1.3.0...bytesize-v2.0.1)

---
updated-dependencies:
- dependency-name: bytesize
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
…ize-2.0.1

build(deps): bump bytesize from 1.3.0 to 2.0.1
This is simply the result of running `cargo update` without touching
Cargo.toml (required since we currently only use dependabot to update
direct dependencies and not indirect/transitive dependencies and useful
to avoid a lot of dependabot PRs for minor/patch updates that can be
bundled, like in this commit).

The MSRV bump to 1.85 (currently the latest stable version) is required
since at least the dependency `ascii_table-4.0.6` already switched to
Rust edition 2024 which was stabilized in the 1.85 release [0].
It's a bit early for the bump but it's fine for us since we're not a
library, our dependencies are already requiring it, and I already
considered switching to the new Rust edition anyway.

[0]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024

Signed-off-by: Michael Weiss <[email protected]>
This does basically apply 354db2a to the whole codebase for consistency.
The `anyhow::bail!` is basically syntactic sugar that is a bit more
compact (tbh I'm a bit split on it as it also hides the `return` a bit
but it's name is expressive enough and since we already make use of it
we might as well also use it consistently everywhere where possible).

Signed-off-by: Michael Weiss <[email protected]>
Update all dependencies (Cargo.lock) and bump the MSRV (1.80 -> 1.85)
Switch to the `anyhow::bail!` macro where possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants